import React from "react";
import { getChildren } from "@/routes/routerConfig";
import { Link, useRoutes } from "react-router-dom";
export default function Admin() {
  const routes = getChildren("admin");
  return (
    <div>
      <h1>后台页面</h1>
      <nav>
        <Link to="/admin/user">用户管理</Link>
        <Link to="/admin/system" style={{ marginLeft: 100 }}>
          系统管理
        </Link>
      </nav>
      {useRoutes(routes)}
    </div>
  );
}
